import service from "../utils/service";

document.cookie = `_xmLog=h5&945470ec-2132-4519-82a3-be107ec95ec9&2.4.18-alpha.0; x-ats=ACNhYmI1OTc1M2QwOWY3NDk1WkQmwyVOUj90ZXN0; Hm_lvt_e2abff7f9ca8c2fa2da3ef27e36bbc27=1693981962,1693994420; Hm_lvt_4a7d8ec50cfd6af753c4f8aee3425070=1693981971,1693994429; trackType=H5; fds_otp=8715256311424168291; 1&remember_me=y; 1&_token=484596584&BE73E180340N1242059DE7FA94E449AFC6BD371203C4B52AA4CD02CB7E17A97455A638AA5E72161M4395D99E97D4535_; 1_l_flag=484596584&BE73E180340N1242059DE7FA94E449AFC6BD371203C4B52AA4CD02CB7E17A97455A638AA5E72161M4395D99E97D4535__2023-09-0708:40:42; login_type=code_mobile; impl=www.ximalaya.com.login; x_xmly_traffic=utm_source%253A%2526utm_medium%253A%2526utm_campaign%253A%2526utm_content%253A%2526utm_term%253A%2526utm_from%253A; Hm_lpvt_4a7d8ec50cfd6af753c4f8aee3425070=1694047596; xm-page-viewid=ximalaya-mobile; Hm_lpvt_e2abff7f9ca8c2fa2da3ef27e36bbc27=1694088438`;

export const reqHotWordCategory = () =>
  service.get("/hotWordBillboardCategory");

export const reqHotWordList = (categoryId:string) =>
  service.get(`/hotWordBillboard/list/2.0?categoryId=${categoryId}&size=20`);

export const reqSearchByKeyWord = (kw:string) =>
  service.get(
    `/revision/suggest?kw=${kw}&paidFilter=${false}&scope=all`
  );

export const reqSearchResult = (kw:string,page:number,rows:number) =>
  service.get(`/m-revision/page/search?kw=${kw}&core=all&page=${page}&rows=${rows}`)